#ifndef ONEXPLAYERSTICKCONTROL_H
#define ONEXPLAYERSTICKCONTROL_H

#include "stickcontrol.h"
#include<QTimer>
class OneXPlayerStickControl : public StickControl
{
    Q_OBJECT
public:
    OneXPlayerStickControl(QObject *parent = nullptr);
    QString getNameByUserKey(int nKey);
    int getUserKeyByName(QString strName);

protected slots:
    void onTimeOut();
private:
    STICK_KEY getUserKeyBySysKey(int nKey);
    QTimer m_Timer;

    long dwXpos = 0;
    long dwYpos = 0;
    long dwUpos = 0;
    long dwRpos = 0;
    long dwZpos = 0;
    long dwPOV  = 0;
    long dwButtons = 0;

    struct ONEXPLAYERKEY{
        int nSysKey;
        STICK_KEY nUserKey;
        QString strKeyName;
    };

    QVector<ONEXPLAYERKEY> m_vtHotKeys;

    // StickControl interface
public:
    QString getFuncKeyName(FUNCTION_KEY nKey);
    QString getHotKeyName(STICK_KEY nKey);
};

#endif // ONEXPLAYERSTICKCONTROL_H
